package com.bitnei.battery.examples;

import com.bitnei.battery.bean.dataBean.replace.RepOut;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wang
 * @Date: 2019/10/16 10:50
 * @Version 1.0
 * Description: 换电出库示例
 */
public class RepOutExample {

    public static void main(String[] args){
        //请求地址
        String url = "http://127.0.0.1:8999/bitnei/v1.0/battery/replaceBattery/replaceOutStorage";
        //组装数据
        List<RepOut> repOutList = mockRepOut();
        //调用接口
        ApiUtilExample.callApi(url,repOutList);
    }


    /**
     * 模拟换电出库库数据
     * @return
     */
    private static List<RepOut> mockRepOut(){
        List<RepOut> repOutList = new ArrayList<>();

        RepOut repOut = new RepOut();
        repOut.setOldCode("DHXMB2258561BBB4E001B030");
        repOut.setRepairDate("2018-04-10");
        repOut.setWhereaboutsCode("91430111MA4L17XXXX");
        repOut.setWhereaboutsName("去向单位企业名称");
        repOut.setReplaceUnitCode("91430111MA4L16XXXX");
        repOut.setReplaceUnitName("换电企业名称");
        repOutList.add(repOut);
        return repOutList;
    }
}
